package com.ware4u.fx.news.entity;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Schema(description = "新闻")
@Entity
@Table(name = "W_NEWS")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class News {
	@Schema(description = "主键")
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	
	@Schema(description = "新闻板块")
	@Column(name = "CATALOG", length = 50)
	private String catalog;
	
	@Schema(description = "标题")
	@Column(name= "TITLE", length = 200)
	private String title;
	
	@Schema(description = "新闻内容")
	@Lob
	@Column(name= "CONTENT")
	@Basic(fetch = FetchType.LAZY)
	private String content;
	
	@Schema(description = "源头")
	@Column(name= "SOURCE", length = 200)
	private String source;
	
	@Schema(description = "创建者")
	@Column(name= "CREATOR", length = 50)
	private String creator;
	
	@Schema(description = "创建时间")
	@Column(name= "CREATETIME")
	private Date createTime;
	
	@Schema(description = "修改者")
	@Column(name= "MODIFIER", length = 50)
	private String modifier;
	
	@Schema(description = "修改时间")
	@Column(name= "MODIFYTIME")
	private Date modifyTime;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCatalog() {
		return catalog;
	}

	public void setCatalog(String catalog) {
		this.catalog = catalog;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
}
